Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi @GabrielH ,
I think the question is how to start this animation when the model target is tracked, right?
You can use javasScript in event:
- I think the modelLoad is a good candidate for this - because when you scan a model target then it will load the model in the view / when there are many model widget you need additionally to check the model name/
e.g.:
$rootScope.$on('modelLoaded', function() {
console.log("modelLoaded event");
const args = Array.from(arguments);
for( let i=0;i< args.length;i++ ) {
console.log("Event args["+i+"]="+args[i])
if( args[1] === "model-1") // is model-1 widget loading complete?
{
//unset the sequence when more sequneces in model
$timeout(function () {
$scope.$applyAsync(()=>{$scope.setWidgetProp('model-1', 'sequence', '');});
},50);
$timeout(function () {
$scope.$applyAsync(()=>{$scope.setWidgetProp(modelName, 'sequence', 'resources/Uploaded/l-Creo 3D - Sequence Test.pvi');});
},50);
$timeout(function() { // will play all
angular.element(document.getElementById('model-1')).scope().playAll();
$scope.$applyAsync();}, 100)
}// end if - model widget name check
}// end for loop for arguments
}); // finish the modelLoad event handling def
Do i need to use creo illustrate or can i use other software?
Hi @GabrielH ,
to create an animation in a step of sequence - this could be done only with Creo Illustrate . This PTC tool will publish to pvz model . For each sequence the pvz (it could be renamed as zip and unzipped) will contain a pvi file. The pvi file is an ANSI text file and in generally could be created by editor or other tool if someone know all commands ( but this will be very work intensive and is not supported - means there is no documentation available ) Therefore to create a sequence with steps you need Creo Illustrate.
Another option is to create an animation via Java Script , see post “Placeing animations on modelItems with javascript”
So could i only use javascript to make animation of that 3d model?
Sorry but i'm very new at this