ZIM BITS - ZIM JS CODE SNIPS

ZIM BITS INTRO

ZIM Bits is a collection of 64 JavaScript code tips, techniques and tutorials to build interactive media for the HTML 5 canvas using CreateJS and ZIM. The amazing world of coding games, puzzles and apps has never been more free and inviting! Also see Bits in the BITS Expo.

Bits Filter   >> open ▼︎

All
Code
Display
Methods
Controls
Wrap
Frame
addTo
53
hitTestRect
1
sca
17
alp
13
hitTestReg
2
scaleTo
1
animate
26
Indicator
1
Scroller
1
async
1
interval
2
setMask
10
Bitmap
1
Label
51
Shape
7
Button
18
Layout
1
shuffle
4
center
32
loop
10
ske
1
centerReg
28
mobile
3
Slider
7
CheckBox
3
mov
22
Sprite
2
Circle
26
outline
1
stopAnimate
1
ColorPicker
2
Pad
1
swapProperties
1
Container
22
Pages
2
Swipe
1
Damp
11
Pane
7
Tabs
2
Dial
4
Parallax
2
TextArea
1
distill
1
place
1
timeout
1
drag
15
pos
51
Triangle
12
expand
6
Proportion
1
Waiter
7
extend
2
ProportionDamp
3
Window
2
fit
1
RadioButtons
2
zet
1
Frame
61
rand
6
zgo
7
Grid
2
Rectangle
39
zimify
3
hitTestBounds
4
reg
11
zob
3
hitTestCircle
3
removeFrom
6
zog
61
hitTestGrid
3
rot
11
zot
3
01 Drawing ZIM Shapes
Draw a circle, rectangle and triangle and center them on the stage
CODEVIEW
02 Random from Array
Get a random element from an array and loop through array in random order
CODEVIEW
03 Quick Log to Console
ZIM provides zog() shortcut for console.log()
CODEVIEW
04 Inline Canvas
Put a ZIM Frame canvas inline into HTML and style with CSS
CODEVIEW
05 Responsive Design
Use ZIM Layout to respond to screen size
CODEVIEW
06 Animate Properties
Use ZIM move() and animate() to tween position, scale, alpha, rotation, etc.
CODEVIEW
07 Preload Images and Sounds
Preload images to show on canvas and play a sound with CreateJS
CODEVIEW
09 Drag and Drag Copy
Drag and drop objects within bounds and multiple times
CODEVIEW
10 Grids GUI for Canvas
See pixels or percent grid positions to avoid guesswork
CODEVIEW
11 Parallax 3D
Parallax moving with mouse movement for layered 3D effect! Also works with page scroll.
CODEVIEW
12 Parameters or Objects
Pass in parameters or a single object with properties names matching parameters
CODEVIEW
13 Swipes and Swiping
Swipe the screen up and down, left and right and capture event direction
CODEVIEW
14 Snapping Multiple Objects
Drag and drop objects that snap into position (hit tests) or animate to return to start
CODEVIEW
15 Damping and Easing
Make motion smooth and natural with an easy Damping class
CODEVIEW
16 Buttons, Radio Buttons, Check Boxes
Use easy components for the Canvas!
CODEVIEW
17 Drag, Slide and Surround!
Slide and object and snap it inside or outside bounds
CODEVIEW
18 Mobile Test
Is the app mobile or not and check for Android, iOS, Winphone or other
CODEVIEW
19 Tabs and Button Rows
Easily make tabs or rows of buttons with this canvas component
CODEVIEW
20 Sequencing Animation
Animate multiple objects to make marquees, etc.
CODEVIEW
21 GUI Editor - Place
Move your objects and record their position for final placement!
CODEVIEW
22 HotSpots!
Clickable regions like image maps - all your nav in one spot!
CODEVIEW
23 Dials and Indicators!
Configurable dial components and infamous Indicators
CODEVIEW
24 Scaling Content to Fit
Fit inside or around bounds with this handy function
CODEVIEW
25 Dynamic Drawing with Easing
Drag to magically change shapes!
CODEVIEW
26 Scrollbars with Sliders
Make a scrollbar using the Slider component and inside parameter
CODEVIEW
28 Registration Points and Centering
Try different registration points and center objects in containers
CODEVIEW
29 Tiles and Pads
Make game boards, tiled thumbnails, Pads, etc.
CODEVIEW
30 Input and Asyncronous Data
Collect user text input and send to and receive from server
CODEVIEW
31 Masks and Masking
Show objects in a frame or make spotlight effect!
CODEVIEW
32 Sound Manipulation
Change volume, panning, pause and play
CODEVIEW
33 Drawing with Blitting
Draw smooth artistic lines with damping and blitting!
CODEVIEW
34 Are Objects Hitting?
Multiple types of hitTests on point, reg, bounds, rect and circle
CODEVIEW
35 Scrubbing an Animation
Use a slider to play an animation - like a Video play head...
CODEVIEW
36 Using Two Canvases
Set up two or more canvases with ZIM Frame!
CODEVIEW
37 Cookies and CSS Selectors
Some HTML love with ZIM Cookies and CSS Selectors
CODEVIEW
38 Gradient and Gloss!
Add gradients or gloss to your buttons and tabs!
CODEVIEW
39 Swipeable Scroll Window
Scroll through text, menus and interactive content with this ZIM Component
CODEVIEW
40 Falling, Catching and Dodging
See how to make the start of thousands of games!
CODEVIEW
41 Make a Maze with ZIM
Move pawn with mouse and collision detect walls
CODEVIEW
42 Physics with Box2D
Move shapes in a world with gravity and collision!
CODEVIEW
43 Buoyancy with Physics!
Add falling ingredients to a bowl of soup!
CODEVIEW
44 Scroll Parallax Effect!
Animate a scene with window scroll
CODEVIEW
45 Chaining Methods
Efficient cool-looking code!
CODEVIEW
46 Pages and Hotspots
Handle all page navigation in one spot!
CODEVIEW
47 Minify Only Code You Use
Reduce file size to practically nothing
CODEVIEW
48 Blend Modes
Apply professional blends with HTML composite operations
CODEVIEW
49 ZIM 4TH Methods
All ZIM functionality as easy methods!
CODEVIEW
50 Ticker Engine
Fail-safe timer engine with latest tech!
CODEVIEW
51 Custom Fonts
Load custom fonts through CSS into ZIM
CODEVIEW
52 ZIM Pizzazz!
Module of shapes for Buttons and Panes
CODEVIEW
53 Sprites and SpriteSheets
Explosive animations using game animation techniques
CODEVIEW
54 Saving Data and JSON
Save states for games and personalization without database
CODEVIEW
55 Side Scroller Animated Background
Classic Flinstones animated car with repeat scrolling
CODEVIEW
56 Color Picker for Propeller!
A custom color picker to set colors on a paused propeller
CODEVIEW
57 Path Finding Level Editor!
Find shortest route through a maze or tiles with cost!
CODEVIEW
58 3D with ThreeJS
Control 3D objects with ZIM interfaces - embed 3D in ZIM
CODEVIEW
59 Icon and Toggle Buttons!
Use ZIM Pizzazz 2 for some classic button icons with a twist!
CODEVIEW
60 Skew for Effect
Stretch and make objects look a little wonky!
CODEVIEW
61 Animate Circles and Spirals
Easy ways to make animated circles and cool spirals
CODEVIEW
62 ZIM loop()
Loop with index, through an array, object or container
CODEVIEW
63 Play and Control Video
Play video as a Bitmap and use controllers!
CODEVIEW
64 Draw and Animate Lines
Animate straight and curved lines using scale, masks and Bezier
CODEVIEW
docscenterReg1 of 21 results
04 Centering Ya!
Do this do that and then find you need to do this!
CODE VIEW
Seeing code
is like revealing
a magic trick!
CANCEL OKAY