yaustar
13
Assuming you would be using the project I linked to above, you would have to compress the textures in the GLB before importing them into PlayCanvas.
You would also have to import the Basis library into the PlayCanvas project.
You mean we could compress(basis) the textures outside the playcanvas? How can we do this? any tool?
yaustar
15
I don’t know any tools offhand but you would be looking for something that would do KTX2 texture compression
gltf transform can be used from command line and can apply mesh / texture compressions
2 Likes
Thank you Steven,
Please read the question at the post:
To visulize the imported glb in the editor is very important to us
yaustar
20
It was already answered this (UK) morning
Many thanks, I got it! Just missed it
How to change materials of heart at runtime?
With the model loaded by this script, I can get the material using the following method, but I can’t change it at present
Is there any good method or case for reference?
yaustar
23
What you have done is correct, you will just need to change the material on the meshInstance via https://developer.playcanvas.com/api/pc.MeshInstance.html#material
Is my writing wrong? I get the color of the material but can’t change it
yaustar
25
Can you possible a project that shows the issue please?
yaustar
27
The issue is that you didn’t parse the loadGlb script for the new color attribute so this.color
is null
After parsing, it works as expected
okay,I know what the problem is. thx
Can the entities added in the script have custom names(entity name)?
yaustar
30
Does the loaded glb have a callback?I want to use ‘ready’ during initialization, but it doesn’t seem to work
I want to konw when this glb loaded
yaustar
32
That commented code should work. Can you please post a new project with the issue?
yaustar
Split this topic
33