Skip to main content

15 docs tagged with "scripts"

View all tags

Create QR Code at runtime

Generate QR codes in the browser at runtime with a small library and show them in UI or on textures.

Dynamic UI Scroll View

Add and remove scroll view children at runtime to build lists and feeds with PlayCanvas screen-space UI.

Loading Draco Compressed GLBs

Load Draco-compressed GLB models in PlayCanvas with the right pipeline so meshes stay small without breaking rendering.

Loading glTF GLBs

Load glTF GLB files as binary assets at runtime and add the resulting model instance to your PlayCanvas scene hierarchy.

Mobile UI Safe Areas

Lay out screen UI inside notched and rounded device safe areas so controls stay clear of system bars and hardware cutouts.

Render 3D World to UI

Render a 3D preview with a dedicated camera into UI elements such as inventory icons or character selection panels.

Using events with scripts

Decouple scripts by firing and listening for custom events on entities or the application for modular gameplay messaging.

Using the Tween library

Animate entity transforms and values over time with the playcanvas-tween helpers and easing curves instead of manual lerps.