Free Hype Templates 🏗

The "Orientation" webpage is online...

...by comparing the width and height of a webpage, it can be quickly determined if the orientation is landscape or portrait. This technique can be applied as an alternative — or complement — to responsive elements and breakpoints.


UPDATE 7/28/2020 (Afternoon) — A new version of template was uploaded.

4 Likes

The "Spotlight" template is online...

https://photics.com/free-template-tuesday-37-tumult-hype-spotlight/

It's in response to this thread...

What I find interesting is how there are so many solutions to this problem. Here's one from @gasspence A Flashlight (mouse follower) — back in May of 2015. It's one of the oldest templates in the "Template Gallery" category. After posting the "Spotlight" template, I looked at the forum list. I was surprised to see that one second to last. Did I waste my time? Nope, it's different, but it's another coding solution.

...and that's where the "Spotlight" template gets tricky. It uses two "On Drag" actions, so the image can be moved left/right or up/down.

It's not pixel perfect. The "Control Element Position" action is pixel perfect. But if you move the image too far, this can happen...

That's why the "Spotlight" template uses "On Drag". While the speed is set to be a bit fast, this method has some advantages. It works well when using a trackpad or touch device. Your finger doesn't have to move so far to control the spotlight. Plus, if the spotlight exactly matched the touch location, your finger could cover the animation.

4 Likes

The "Timely" template is online...

https://photics.com/free-template-tuesday-38-tumult-hype-timely/

It's in response to this thread...

Basically, the template shows how to add real-world time-based animation. Based on the time of the day, you can load a specific scene. That same idea could be used to load a timeline, or go to a specific point in a timeline. In this example, it's a city scene that changes color... Morning, Afternoon, Evening, and Nite. There's also a corresponding greeting.

Recently, macOS added a lot of timely features... Dark Mode, Night Shift, and Dynamic Desktop. Tumult is even expanding that with their "Nightly" app...

...with a few conditionals and a timer, your Hype project can also react to the time of the day.

These related templates may also be useful...

4 Likes

2 posts were merged into an existing topic: Topics on time triggers

The "Controlling" template is online...

https://photics.com/free-template-tuesday-39-tumult-hype-controlling/

It is in response to this thread...

Instead of a game competition, something more casual was planned. That means no prizes. Instead, there's a gift for everyone that wants to make games with Hype. It's called the Photics-Physics-Bridge. By adding this JavaScript library to your project, the gap between Matter.js and Hype's Physics API is bridged. In other words, it becomes easier to make games with Hype.

That's what this week's template is all about. It shows how to make a four-way controller with Hype, by using the PPB.

If you do make a good game with Hype, starting from April 20, 2021 until October 20, 2021, can show it off in the Year of Fun :joystick:

2 Likes

Just a heads up, while working on the App version of A Book About Hype, I updated the "Origin" template...

I realized that the previous method that I was using to animate the crosshair was excessive. I switched it to use SVG animation — much easier.

origin-animated

1 Like

The “Looking” template was updated. It's much cleaner and more modern now. Also, the YouTube video is online.

hype-template-02[Hype #2] The “Looking” Template (When Is It Necessary To Write Your Own Code?)

1 Like

This post is to let you know that some of the earlier templates have been updated recently. In particular, the first "fps" template was updated.

It didn't have the optional duration value, which lets the needle in the FPS gauge move more smoothly. Also, it's better coding to use innerText instead of innerHTML, when possible.

This is next video for Photics.TV, but it's not ready yet. Meanwhile, I lost track of which other templates were update. HEH! So, see Photics.com for the latest versions of the templates.

Also, @jonathan, I noticed a problem…

It looks like a thumbnail images is included in the Template. This doesn't seem like a good idea. The screenshot is bigger than the rest of the template. So, for these free Hype templates, I've been manually removing the thumbnail images from the updated templates.

1 Like

This is a cache, so it is a disk space vs. performance issue. If thumbnails are not included then scenes need to be fully loaded and rendered when the document opens. This can potentially take a lot of time, CPU power and RAM, so we favor maintaining a cache. You're welcome to delete the thumbnails if you do not want to incur the costs of disk or transfer.

That's too bad. This seems like it could be a user preference, or even one of those cool terminal commands.

1 Like

Maybe try an Automator Folder Action that runs a script to rm *.hype/Thumbnails/* or something like that.

Hah, those two little characters look so innocent and they are so long as you know how to use them.
If you are not familiar with its usage and there is a small typo, it could lead to very unexpected Permanent Deletions. (even for the familiar )

Personally I would use something like this which moves them to the Trash bin.

1, find Finder items

  • set where to look
    -set kind is other and to Hype Document Template

2, Get folder contents

3, Applescript

  • will filter and move to trash.

on run {input, parameters}
	
	repeat with i from 1 to the number of input
		set this_item to (item i of input)
		set this_info to info for this_item
		if name of this_info is "Thumbnails" then
		 
			tell application "Finder" to delete this_item (* moves to trash *)
		end if
		
	end repeat
	
end run
2 Likes

Just a heads up! I didn't forget about the Tumult Hype series of videos on Photics.TV. I'm planning to launch the “Captials” video on Veterans Day, since that template has a big American flag. :us:


UPDATE: The video is scheduled to launch on 2021-11-11T13:00:00Z and here's the link…

The “Capitals” template was updated too.

  • Uses Hype's customData API instead of “window” Global Variables
  • Switched one stray innerHTML to innerText
  • Changed hover style, as it was blurry in Safari when scaled
1 Like

The “Multilingual” video should be on Photics.TV soon. In preparing for the video, I updated the code.

3 Likes

Recently I got a comment on my YouTube channel which suggests that I've been making too many video game videos. :smile:

So…

Are you interested in another Photics.TV video about Hype?

  • Yes, I would watch that! :slightly_smiling_face:
  • Nah, I already know everything about Hype. :smile:
0 voters
2 Likes

Unanimous, huh? Well, it looks like I should make a new Hype video. :smile:

I also got a new comment on one of the previous videos that asks a good question. The answer is best delivered as a new Hype Template.

@jonathan — If you get around to updating Hype again… :blush: …here's something that should be really easy to add that would make Hype more useful in creating card games…

-webkit-backface-visibility: hidden;
backface-visibility: hidden;

You might even be able to drop the “webkit” prefix eventually too. The next major version of Hype should drop support for Internet Explorer 6-9. Therefore, the browser support is excellent…

Basically, what that does is hide elements when they're flipped upside-down… such as with Y rotation…

rotation

More info here…

That CSS style is perfect for cards games, as it can be used to create a nice card flipping technique. That's a big part of what the next template and video is about.

2 Likes

It so happens we have another bug relating to backface-visibility so that might bump this up. (but that said, I'd like to consider how this will add extra UI complexity for something not frequently changed, so it may be harder than just adding a checkbox).

Well, I found a bug. Apparently it doesn't work well with scaling. It will make enlarged elements look blurry.

Perhaps it could be an “Advanced” section that expands because I don't use “Rotation follows motion path” often either. I don't think you have an interface type like that already though.

Something like Apple's Numbers… Cell… Fill…

I'm not sure if that's possible to nest checkboxes within collapsible sections though. :man_shrugging:t2:

1 Like

This doesn't surprise me. There's a minefield of things that will change rendering modes (not to mention fighting Hype's own choices on trying to force render modes to avoid certain rendering bugs...). You can try toggling Use WebKit graphics acceleration/position with css left/top and see if that coaxes anything better.

1 Like

I already converted the Hype document size to 4K. Now it will likely scale down. If you're using 8K monitors to play a card game full screen… that's not supported. :smile:

…but I tested it out anyway. The scaling was still blurry.


Also, I just realized that "rotateY" is not supported with hypeDocument.setElementProperty().